class DateUtil{

  formatDate(date: Date): string {
    let year = date.getFullYear()
    let month = date.getMonth()+1
    let day = date.getDate()
    let m = month < 10 ? '0' + month : month
    let d = day < 10 ? '0' + day : day
    return `${year}-${m}-${d}`
  }
}

const dateUtil = new DateUtil()
export default dateUtil as DateUtil